Skip to main content

IRuleBuilder<T, TProperty>

Rule builder

Assembly: ServiceStack.dll
View Source
Declaration
public interface IRuleBuilder<T, out TProperty>

Methods

SetValidator(IPropertyValidator)

Associates a validator with this the property for this rule builder.

View Source
Declaration
IRuleBuilderOptions<T, TProperty> SetValidator(IPropertyValidator validator)
Returns

ServiceStack.FluentValidation.IRuleBuilderOptions<<T>,<TProperty>>

Parameters
TypeNameDescription
ServiceStack.FluentValidation.Validators.IPropertyValidatorvalidatorThe validator to set

|

SetValidator(IValidator<TProperty>, String[])

Associates an instance of IValidator with the current property rule.

View Source
Declaration
IRuleBuilderOptions<T, TProperty> SetValidator(IValidator<TProperty> validator, params string[] ruleSets)
Returns

ServiceStack.FluentValidation.IRuleBuilderOptions<<T>,<TProperty>>

Parameters
TypeNameDescription
ServiceStack.FluentValidation.IValidator<T>validatorThe validator to use

| | System.String[] | ruleSets |

|

SetValidator<TValidator>(Func<T, TValidator>, String[])

Associates a validator provider with the current property rule.

View Source
Declaration
IRuleBuilderOptions<T, TProperty> SetValidator<TValidator>(Func<T, TValidator> validatorProvider, params string[] ruleSets)
where TValidator : IValidator<TProperty>
Returns

ServiceStack.FluentValidation.IRuleBuilderOptions<<T>,<TProperty>>

Parameters
TypeNameDescription
System.Func<<T>,<TValidator>>validatorProviderThe validator provider to use

| | System.String[] | ruleSets |

|

Type Parameters
  • TValidator

SetValidator<TValidator>(Func<T, TProperty, TValidator>, String[])

Associates a validator provider with the current property rule.

View Source
Declaration
IRuleBuilderOptions<T, TProperty> SetValidator<TValidator>(Func<T, TProperty, TValidator> validatorProvider, params string[] ruleSets)
where TValidator : IValidator<TProperty>
Returns

ServiceStack.FluentValidation.IRuleBuilderOptions<<T>,<TProperty>>

Parameters
TypeNameDescription
System.Func<<T>,<TProperty>,<TValidator>>validatorProviderThe validator provider to use

| | System.String[] | ruleSets |

|

Type Parameters
  • TValidator